
<!--子组件模板-->
<template>
  <div>

  </div>
</template>
<!--子组件-->
const cpn = {
template: '#cpn',
data() {
  return {
     categories:[
      {id: 'aaa',name: '热门推荐'}
      {id: 'aaa',name: '热门推荐'}
      {id: 'aaa',name: '热门推荐'}
      {id: 'aaa',name: '热门推荐'}
      ]
 }
}
<!--2、父组件-->
